import 'dart:async';
import 'dart:ui';

///防重复点击
class PreventDoubleTap {
   int timeOld = 0;

   onDoubleTap({int interval = 1000}) {
    int timeNew = DateTime.timestamp().millisecondsSinceEpoch;
    if (timeNew - timeOld < interval) {
      return false;
    }
    timeOld = timeNew;
    return true;
  }
}
